﻿(function(){
	if(!Mui){
		return;
	}
	Mui.ns('Mammoo');
	Mui.use('Mui.form.base,Mui.tip',function(Mui){
		Mammoo.form=Mui.extend(Mui.form.base,{
			success:Mui.emptyFn,
			fail:Mui.emptyFn,
			error:Mui.emptyFn,
			onSuccess:function(r){
				eval('r='+r);
				if(r.success){
					this.reset();
					this.success.call(this,r);
				}else{
					this.fail.call(this,r);
				}
			},
			onError:function(r){
				this.error.call(this,r);
			}
		});
	});
})();